package com.tct.worktimeboard.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.tct.worktimeboard.entity.vo.DepartmentVO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * @author Huhailong
 * @Description
 * @Date 2021/2/22.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class Project extends PageObject implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @Excel(name = "项目名", orderNum = "1", width = 25,needMerge = true)
    private String projectName;
    private Long projectTypeId;
    private Long groupId;
    private String createTime;

    @Excel(name = "类型名", orderNum = "2", width = 25,needMerge = true)
    @TableField(exist = false)
    private String typeName;

//    @ExcelCollection(name = "用户工时", orderNum = "3")
    @TableField(exist = false)
    private List<Work> workList;

    @ExcelCollection(name = "部门工时", orderNum = "3")
    @TableField(exist = false)
    private List<DepartmentVO> departmentVOList;

    @TableField(exist = false)
    private List<Long> selectedProjectList;
}
